package com.poly.system;

import com.poly.common.core.constant.SecurityConstants;
import com.poly.common.core.constant.ServiceNameConstants;
import com.poly.common.core.domain.R;
import com.poly.system.domain.SysDept;
import com.poly.system.domain.SysUser;
import com.poly.system.factory.RemoteDeptFallbackFactory;
import com.poly.system.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户服务
 *
 * @author Yang huijing
 */
@FeignClient(contextId = "remoteDeptService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteDeptFallbackFactory.class)
public interface RemoteDeptService {
    /**
     * 获取缓存部门列表
     *
     * @param deptIdList
     * @return
     */
    @GetMapping("/dept/getCacheDeptList")
    R<List<SysDept>> getCacheDeptList(@RequestParam("deptIdList") List<Long> deptIdList);

    /**
     * 获取部门名称
     *
     * @param deptIdList
     * @return
     */
    @GetMapping("/dept/getCacheDeptName")
    R<String> getCacheDeptName(@RequestParam("deptIdList") List<Long> deptIdList);
}
